package com.molichuxing.services.infrastructure.service;


import com.molichuxing.framework.dto.Paged;
import com.molichuxing.services.infrastructure.dto.request.create.YearlyInspectionCreateDto;
import com.molichuxing.services.infrastructure.dto.request.modify.YearlyInspectionModifyDto;
import com.molichuxing.services.infrastructure.dto.response.YearlyInspectionDto;
import com.molichuxing.services.property.CarYearlyInspectStatusEnum;
import com.molichuxing.services.property.YearlyInspectHandleStatusEnum;

import java.util.List;
import java.util.Map;

/**
 * 年检 服务类
 * @author xuelin yi
 */
public interface YearlyInspectService {

    /**
     * 根据条件查询年检列表
     * @param carYearlyInspectStatusEnum
     * @param carIds
     * @param inspectStartDate
     * @param inspectEndDate
     * @param pageSize
     * @param pageNum
     * @return
     */
    Paged<YearlyInspectionDto> getYearlyInspectionPage(CarYearlyInspectStatusEnum carYearlyInspectStatusEnum, List<Integer> carIds, Integer stockId, String inspectStartDate, String inspectEndDate,Integer handleStatus, String sortName, String sortWay, Integer pageSize, Integer pageNum);

    /**
     * 根据车辆id获取年检信息
     * @param carId
     * @return
     */
    public YearlyInspectionDto getYearlyInspectionByCarId(Integer carId);

    /**
     * 新增年检信息
     * @param createDto
     * @return
     */
    public int createYearlyInspection(YearlyInspectionCreateDto createDto);

    /**
     * 编辑年检信息
     * @param createDto
     * @return
     */
    public int modifyYearlyInspection(YearlyInspectionModifyDto createDto);

    /**
     * 根据状态获取年检数量
     * @param statusEnum
     * @return
     */
    public int getYearlyInspectCount(CarYearlyInspectStatusEnum statusEnum);

    /**
     * 年检导出
     * @param carYearlyInspectStatusEnum
     * @param carIds
     * @param stockId
     * @param inspectStartDate
     * @param inspectEndDate
     * @return
     */
    public List<YearlyInspectionDto> getYearlyInspectionList(List<String> inspectionIdList,CarYearlyInspectStatusEnum carYearlyInspectStatusEnum, List<Integer> carIds,Integer stockId, String inspectStartDate, String inspectEndDate);

    public long getYearlyInspectDownloadCount(List<String> inspectionIdList,CarYearlyInspectStatusEnum carYearlyInspectStatusEnum, List<Integer> carIds,Integer stockId, String inspectStartDate, String inspectEndDate);

    /**
     * 根据状态查询车辆
     *
     * @param yearlyInspectHandleStatusEnum
     * @return
     */
    public List<Integer> getCarIdListByHandleStatus(YearlyInspectHandleStatusEnum yearlyInspectHandleStatusEnum);

    /**
     * 批量修改
     *
     * @param list
     * @return
     */
    public Boolean modifyYearlyInspectionBatch(List<YearlyInspectionModifyDto> list);

    /**
     * 修改年检
     *
     * @param carIdList
     * @return
     */
    public Boolean modifyYearlyInspection(List<Integer> carIdList);

    /**
     * 车辆id获取年检
     * @param carIdList
     * @return
     */
    public List<YearlyInspectionDto> getYearlyInspectionListByCarId(List<Integer> carIdList);

    /**
     * 修改办理状态
     *
     * @return
     */
    public Boolean modifyYearlyInspectionHandleStatus();

}
